bool isPalindrome(char* s)
{
    char str[300000] = { 0 };
    int index = 0;
    for (int i = 0; s[i] != '\0'; i++)
    {
        char ch = s[i];
        if (isalpha(ch))
        {
            ch = tolower(ch);
            str[index++] = ch;
        }
        if (isdigit(ch))
        {
            str[index++] = ch;
        }
    }
    for (int i = 0; i < index / 2; i++)
    {
        if (str[i] != str[index - 1 - i])
            return false;
    }
    return true;
}